﻿using System;
using System.Windows;

namespace WpfGameControls
{
    public static class WpfMessageBox
    {
        public static void Show (string message, string caption)
        {
            var dialog = new MessageDialog (message, caption, MessageBoxButton.OK);
            dialog.Owner = Application.Current.MainWindow;
            dialog.ShowDialog();
        }


        public static MessageBoxResult ShowQuestion (string message, string caption)
        {
            var dialog = new MessageDialog (message, caption, MessageBoxButton.YesNo);
            dialog.Owner = Application.Current.MainWindow;

            var result = dialog.ShowDialog();

            return result.HasValue && result.Value? MessageBoxResult.Yes : MessageBoxResult.No;
        }
    }
}
